﻿using UnityEngine;

namespace Core
{
    public class AttackState : BaseState
    {
        private int attack = Animator.StringToHash("attack");
        private Animator animator;
        public AttackState(Unit unit)
        {
            this.animator = unit.Animator;
        }

        public override void Enter()
        {
            animator.SetBool(attack, true);
        }
        public override void Exit()
        {
            animator.SetBool(attack, false);
        }
    }
}